<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
    integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

  <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css"
    integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

  <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"
    integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous">
  </script>
  <script src="https://cdn.bootcss.com/jquery/3.3.0/jquery.js"></script>
  <script type="text/javascript" src="https://cdn-hangzhou.goeasy.io/goeasy.js"></script>
</head>

<body>
  <form action="">


    <div style="margin: 20px auto;width: 600px;">
      <textarea class="form-control" id="msgTxt">{salesCount: 2}</textarea>
      <div style="margin-top: 10px;">
        <button type="button" class="btn btn-info" id="sendBtn">修改</button>
      </div>
      <div>
        <input type="text" placeholder="今日服务顾客">
      </div>
    </div>
  </form>

  <script type="text/javascript">
    // 已服务顾客是算结账数量，还是取票人数？
    var ws_store_order_text = {
      todayCountOfCustomer: 32,
      monthCountOfCustomer: 1962
    }

    // 

    var goEasy = new GoEasy({
      appkey: 'BC-6b49dbcc4fec4333a907a97e60357e9c'
    });

    goEasy.subscribe({
      channel: 'zmp_screen_share',
      onMessage: function (message) {
        console.log(message);
      }
    });


    $('#sendBtn').click(function () {
      goEasy.publish({
        channel: "zmp_screen_share",
        message: $('#msgTxt').val()
      });
    })
  </script>
</body>

</html>